import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  let attrs =  { expires: 7, path: '/' ,domain:'.flowers.com'}
  return Cookies.set(TokenKey, token,attrs)
}

export function removeToken() {
  let attrs =  { expires: 0, path: '/' ,domain:'.flowers.com'}
  return Cookies.remove(TokenKey,attrs)
}
